import wtforms

from packages.common.base import BaseForm, BasePageForm


class ConfigForm(BaseForm):
    """
    配置表单校验类
    """
    id = wtforms.IntegerField()
    name = wtforms.StringField("配置名称", [wtforms.validators.DataRequired(message="配置名称不能为空")])
    code = wtforms.StringField("唯一编码", [wtforms.validators.DataRequired(message="唯一编码不能为空")])
    groupCode = wtforms.StringField("分组编码", [wtforms.validators.DataRequired(message="分组编码不能为空")])
    content = wtforms.StringField("配置内容")
    isSys = wtforms.StringField("是否系统")
    enabled = wtforms.StringField("是否启用")
    remark = wtforms.StringField("备注")
    createUser = wtforms.StringField("创建用户")
    updateUser = wtforms.StringField("更新用户")


class ConfigPageForm(BasePageForm):
    """
    配置分页校验类
    """
    pass
